﻿using System;
using System.Collections.Generic;
using System.Data.SQLite;
using System.Windows.Forms;
using Justin.Log;
using Justin.Stock.DAL;
using Justin.Stock.Models;
using Justin.Stock.Utility;

namespace Justin.Stock
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            StockDAL.InitDB();

            string fileName = "StockInfo.xml";
            try
            {
                var form = new DeskStocks(fileName);
                //HideOnStartupApplicationContext context = new HideOnStartupApplicationContext(form);
                Application.Run(form);
            }
            catch (Exception ex)
            {
                JLog.Write(LogMode.Error, ex);

            }
        }
    }
}
